#   Copyright 2008 Sammy Fischer
#
#   This file is part of Ice Ice Penguin.
#
#   Ice Ice Penguin is free software: you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   Ice Ice Penguin is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with Ice Ice Penguin.  If not, see <http://www.gnu.org/licenses/>.
#
#  You can contact me at sammy.fischer@gmail.com
#

-----------------------------------------
RELEASE NOTES :
This is version 1.5 of Ice Ice Penguin. This is (probably) the final version of the game mechanics. The next big version should be 2.0 and should have online gameplay, a level editor (for details on how to create new levels without the editor, read further below) and perhaps even an AI, but the gameplay, as it is now, is how it is supposed to be. I hope you'll enjoy it as much as me and my family and friends do.

-----------------------------------------
WHAT'S THIS?

"Ice Ice Penguin" is a remake of an old SEGA Dreamcast game called "Chu Chu Rocket".
Two to four players try to steer penguins from the safety of the central igloo to the player's water hole. To do this, each player can place up to three of the five random direction arrows assigned to him on the gamefield.
Arrows can be chosen using the control cursor in the lower part of the screen, and be placed on any free field using the field cursor and the action key. Each arrow will disappear after after a given time (15 seconds by default) and a new arrow will automagically appear in the control field.
Bears eat penguins (at least in this game). If a bear enter a player's target area, the player loses up to 15 points (the score can not become negative)
Special penguins, marked by a colored ring, score 10 points and launch a 10 second long special event. See below for a list of events.
The game ends when the ice on the right side of the screen has reached the bottom (after 3 minutes by default)
Winner is the player who gathered the most penguins.

-----------------------------------------
REQUIREMENTS

You'll need python2.5 and pygame to run the game. Speedwise, I tested it on an Acer Aspire One, and it ran okay. Not great, but okay. If you have time, tell me your configuration and how the game ran for you.

-----------------------------------------
CONTROLS

The default controls are set for the french keyboard (AZERTY), so you might need to change them using the in-game menu.

BLUE PLAYER                     RED PLAYER
(keyboard)                   (numerical keypad)

FIELD CURSOR                    FIELD CURSOR
      z                             [UP]
      |                              |
 q --  -- d                 [LEFT] -- -- [RIGHT]
      |                              |
      s                            [DOWN]

CONTROL CURSOR                  CONTROL CURSOR
 w -------c                  [PgUP]-------[PgDown]

 USE : [SPACE]                   USE : [ENTER]


YELLOW and GREEN are setup to use PS3 controllers by default.

-----------------------------------------
SPECIAL EVENTS

Special Events last for up to 10 seconds. Events that are not instantaneous (everything but WIPE OUT and SHUFFLE) will be overriden if a new event takes place during the 10 seconds.

PINGUIN MANIA : the spawn rate is increased by 4
BEAR MANIA : only bears and the occasional special penguins are spawned. The spawn rate is decreased by 4
SLOW DOWN : the penguins and bears move at half their normal speed
SPEED UP : the penguins and bears move at twice their normal speed
WIPE OUT : all arrows currently on the field are erased after two seconds. Arrows which should have been erase before that will stay for the full two seconds, arrows set after the event is launched have a standard lifetime. The Event takes place instantaneously and doesn't last the full 10 seconds.
VIVA LAS VEGAS (SHUFFLE) : all the still available arrows in the lower control panel are replaced randomly. The effect is instantaneous. The Event takes place instantaneously and doesn't last the full 10 seconds.

-----------------------------------------
CREATING LEVELS

while I intend to have integrate a level editor into the game, currently the only way to create new levels is by using a text editor.
Copy one of the files with the extension ".iip" in the directory "lvls", and open the file in your favourite text editor. You'll see something like this :

1...#2...#3...#4....
....................
...............#....
..........#.........
.....#..............
#...................
....................
...............S...#
..........S.........
.....S..............
S...................


The dots (.) are empty fields.
'1','2','3' and '4' are the player's target. (1 is blue, 2 is red, 3 is yellow, 4 is green)
'S' are start igloos
'#' are walls

Set your keyboard to REPLACING mode (tap the INSERT key once) and modify the level. You can add any comments you like after the last line of the actual level.
When editing, be carefull not to have any trailing spaces on any lines of the level. (see the Known Issues)
Save the file, rename it to anything you like, except "RANDOM.iip", and keep the extension .iip, and restart the game. It should now appear in the list of available level and will eventually appear when using the RANDOM level selector.

If you create cool levels you'd like to be included in future releases of Ice Ice Penguin or a possible level pack, you're welcome to mail them to me (sammy.fischer@gmail.com), stating that you give me permission to publish them with the game.

-----------------------------------------
KNOWN ISSUES

    * the level loading routine is somewhat flaky regarding CR/LF and trailing spaces
    * heavy use of "global" isn't stylisticaly great. But I'll survive and so will you
    * full screen doesn't work in Windows

-----------------------------------------
ROADMAP (kind of)

TODO for version 1.0:
    * display the scores during the game (DONE)
    * time-left announcements (DONE)
    * make the arrows blink a few seconds before they fade away
    * more levels (DONE)
    * Add the ability to have multiple starting points (DONE)
    * translate the menus (DONE)

TODO for version 1.5:
    * add special events (penguinmania, ...) (DONE)
    * add polar bears (DONE)

TODO for version 2.0:
    * add Network support
    * add a level editor
    * optionally add an AI

-----------------------------------------
AKNOWLEDGEMENTS:

* The soundtrack "Retrorific" was composed and created for me by someone called keiko who used to have the account azumi123 on MSN Messenger. Should she read this or if you know her, please do contact me.
* The font used for the menus was created by james shield and can be downloaded from www.dafont.com
* The model of tux used for the artwork was downloaded from wikipedia and rendered using Blender2.48
* German Translation by Thomas Mueller
* A lot of thanks to Ashy and my niece Moon for the beta testing
* The sound samples are built out of samples I found at www.freesound.org and therefore licensed under the creative common license (http://creativecommons.org/licenses/sampling+/1.0/). Here is the list, separated by samples where they were used:

    ambient.ogg :
        48412__Luftrum__oceanwavescrushing.wav
        57046_NoiseCollector_waves.wav

    alert1minute.ogg :
        32856_Joman2001_Heart.mp3
        48934__fresco__old_railroad_crossing_by_fresco.wav
        51752__erkanozan__WARNING.wav
        47729_wimwam_HardCore_Kick_26.wav

    splash.ogg :
        9508__petenice__SPLASH.wav

    applause :
        49477__neonaeon__fanfare1.flac
        18665__Halleck__cheering_16.flac
        56594_Syna_Max_fireworks_4th_of_july_2008_kids.wav

    suddendeath.ogg :
        19433__Heigh_hoo__drumroll.aif

    alerts.ogg :
        26751_altemark_ping1.wav

    ping.ogg was created by me using Audacity
